<!DOCTYPE html>
<html>
    <head>
             <meta charset="UTF-8">
              <style>
                html{
                    height:100%
                        }

                body{
                   height: 100%;
                      margin: 0px;

                    }
    /*定义一个样装类*/
                .container{
                        width: 100%;
                        height: 100%;
                        background-color:aquamarine;
                        overflow: auto;
                        display: flex;
                        flex-direction: column;
                          }
                .card{
                        width: 95%;
                        height: 300px;
                         background-color:blueviolet;
                        margin-top:20px;
                         flex:0 0 auto;/*禁止自动缩放*/
                            }
                 </style>
    </head>
   <body>
       <div class="container">
           <div class="card"></div>
           <div class="card"></div>
           
        </div>
    </body>
</html>
